<?php
import('Psg.Core');
$id = $viewParams[0];
?>
<h1></h1>
<div style="float: left; width: 200px;">
    <?=
            View::factory('_aplet_usrBigPanel')
            ->set('email', Psg\Core::getUserMailById($id))
            ->set('overview', true);
    ?>
</div>
<div style="width: auto;">
    <h3>Napisz wiadomość do <?= \Psg\Core::getUserInfo(\Psg\Core::getUserMailById($id))['nick'] ?></h3>
    <form action="<?= Url::site('forms') ?>" method="post">
        <input type="hidden" name="from" value="<?= PSG_CURUSREUID ?>"/>
        <input type="hidden" name="to" value="<?= $id ?>"/>
        <input type="hidden" name="_ACTION" value="messages"/>
        <input type="hidden" name="_EXECUTE" value="write"/>
        <label for="topic">Temat</label>
        <input type="text" name="topic" size="60"
        <?php if (isset($viewParams[1])): ?>
               value="Re: <?= $viewParams[1] ?>"
               readonly="readonly"
        <?php endif; ?>
               /><hr/><hr/>
        <textarea name="message" rows="15" style="width: 100%;"></textarea>
        <hr/>
        <div style="text-align: right">
            <button type="submit" name="btnSubmit">Wyślij wiadomość</button>
        </div>
    </form>
</div>
<div class="breakDiv"></div>